package com.xszx.vo;

import java.util.HashMap;
import java.util.Map;

/**
 * @author kangkang
 */
public class AjaxJson {
    //success:true/false   code:200 500  errMsg   data

    private String success = "true";
    private String code = "200";
    private String errMsg;
    private Map<String , Object> data = new HashMap<>();

    public String getSuccess() {
        return success;
    }

    public void setSuccess(String success) {
        if("true".equals(success)){
            this.success = "true";
        } else if ("flase".equals(success)) {
            this.success = "false";
            code = "500";
        }

    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getErrMsg() {
        return errMsg;
    }

    public void setErrMsg(String errMsg) {
        this.errMsg = errMsg;
    }

    public Map<String, Object> getData() {
        return data;
    }

    public void setData(Map<String, Object> data) {
        this.data = data;
    }
    public void put(String key ,Object value){
        data.put(key,value);
    }
}
